﻿using System.Runtime.Serialization;

namespace Tequila.Phone.Location.Bing.DTO
{
    [DataContract]
    public class BingResponse
    {
        private const int successCode = 200;

        [DataMember(Name = "resourceSets")]
        public ResourceSet[] ResourceSets
        {
            get;
            set;
        }

        [DataMember(Name = "statusCode")]
        public int StatusCode
        {
            get;
            set;
        }

        public bool IsSuccess
        {
            get
            {
                return StatusCode == successCode;
            }
        }
    }
}
